package com.icity.entity;

import java.io.Serializable;
import java.util.Date;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
/**
 * @describe 系统用户实体类
 * @author Lyn
 * @date 2018.08.10
 */
public class User implements Serializable{

	private static final long serialVersionUID = -1765020113386166368L;
	//注册信息
	private Integer id;
	private String unique_code;//唯一标识
	private String parent_code;//父级code
	private String phone;//电话
	private String pwd;//自媒体明文密码
	private String password;//自媒体密文密码（MD5加密2次）
	private String username;//登录账号
	//基本信息
	@NotEmpty(message="名称不能为空")
	@Length(min=2, max=10, message="2-10个字符")
	private String name;//名称
	private String poster;//头像
	//其它字段
	private Integer status;//审核状态 0：待审核；1：审核拒绝；2：审核通过
	private Integer is_use;//是否启用 1.启用 2.禁用；
	private Integer level;//级别
	private Integer is_partner_or_user;//用户类型：1.合伙人；2.普通后台用户
	private Date create_time;//创建时间
	private Date update_time;//修改时间
	private String type;

	//业务需要，数据库无需添加
	private String role_name;//角色名称

	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getRole_name() {
		return role_name;
	}
	public void setRole_name(String role_name) {
		this.role_name = role_name;
	}
	public Integer getIs_partner_or_user() {
		return is_partner_or_user;
	}
	public void setIs_partner_or_user(Integer is_partner_or_user) {
		this.is_partner_or_user = is_partner_or_user;
	}
	public String getUnique_code() {
		return unique_code;
	}
	public void setUnique_code(String unique_code) {
		this.unique_code = unique_code;
	}
	public String getParent_code() {
		return parent_code;
	}
	public void setParent_code(String parent_code) {
		this.parent_code = parent_code;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getPwd() {
		return pwd;
	}
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPoster() {
		return poster;
	}
	public void setPoster(String poster) {
		this.poster = poster;
	}
	public Integer getIs_use() {
		return is_use;
	}
	public void setIs_use(Integer is_use) {
		this.is_use = is_use;
	}
	public Integer getLevel() {
		return level;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}

	public Date getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Date create_time) {
		this.create_time = create_time;
	}
	public Date getUpdate_time() {
		return update_time;
	}
	public void setUpdate_time(Date update_time) {
		this.update_time = update_time;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
}
